package com.iscas.dataaggregation.domain.experiment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName faultinnernode
 */
@TableName(value ="faultinnernode")
@Data
public class Faultinnernode implements Serializable {
    /**
     * 流程节点id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 所属故障id
     */
    private Integer fault_config_id;

    /**
     * 流程节点内容
     */
    private String content;

    /**
     * 流程节点序号
     */
    private Integer node_index;

    /**
     * 流程节点状态（0:未执行 1:执行中 2:执行失败 3:执行成功）
     */
    private Integer node_status;

    /**
     * 节点名称(展示)
     */
    private String name;

    /**
     * 节点类型
     */
    private String node_type;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Faultinnernode other = (Faultinnernode) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFault_config_id() == null ? other.getFault_config_id() == null : this.getFault_config_id().equals(other.getFault_config_id()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getNode_index() == null ? other.getNode_index() == null : this.getNode_index().equals(other.getNode_index()))
            && (this.getNode_status() == null ? other.getNode_status() == null : this.getNode_status().equals(other.getNode_status()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getNode_type() == null ? other.getNode_type() == null : this.getNode_type().equals(other.getNode_type()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFault_config_id() == null) ? 0 : getFault_config_id().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getNode_index() == null) ? 0 : getNode_index().hashCode());
        result = prime * result + ((getNode_status() == null) ? 0 : getNode_status().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getNode_type() == null) ? 0 : getNode_type().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fault_config_id=").append(fault_config_id);
        sb.append(", content=").append(content);
        sb.append(", node_index=").append(node_index);
        sb.append(", node_status=").append(node_status);
        sb.append(", name=").append(name);
        sb.append(", node_type=").append(node_type);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}